/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 小梅就是酱子
 * Date: 2022-01-26
 * Time: 16:24
 */
//比如一个数字1234，打印出来为1 2 3 4
public class 按顺序打印一个数字的每一位 {
    public static void main(String[] args) {
        print(1234);
    }
    public static void print(int n) {
        if (n < 10) {
            System.out.print(n+" ");
        } else {
            print(n / 10);
            System.out.print(n % 10 + " ");
        }
    }
}
